package com.example.demo.common;

import org.springframework.web.bind.annotation.*;


/**
 * 异常类的统一处理
 */
@RestControllerAdvice
public class ExceptionAdvice {

    @ExceptionHandler(Exception.class)
    public Object  exceptionHandler(Exception e) {
        return Result.fail(-1, e.getMessage());
    }

}
